﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ucMenuChild.ascx.cs" Inherits="Admin_ucControl_ucMenuChild" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<div id="tabledata" class="section">
    <h2 class="ico_mug">
        LIST MENU CHILDREN</h2>
    <table>
        <tr>
            <td style="width: 500px">
                <asp:Repeater ID="reParentMenu" runat="server" OnItemDataBound="reParentMenu_ItemDataBound">
                    <ItemTemplate>
                        <li id="820">
                            <div>
                                <asp:HyperLink ID="hid" runat="server" ToolTip="Edit Parent Page"><%#Eval("CategoryParrName")%></asp:HyperLink>
                                <asp:HiddenField ID="hidIDMenuP" runat="server" />
                                <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# "~/Admin/MenuChildren.aspx?idP=" + Eval("IDCateParrent") %>'
                                    ToolTip="Add Child Page">
                                    <asp:Image ID="img" runat="server" ImageUrl="~/Admin/img/add.png" /></asp:HyperLink>
                            </div>
                        </li>
                        <ul class="module-list">
                            <asp:Repeater ID="reChildMenu" runat="server">
                                <ItemTemplate>
                                    <li id="820">
                                        <div>
                                            <asp:HyperLink ID="hyChild" runat="server" NavigateUrl='<%# "~/Admin/MenuChildren.aspx?idC=" + Eval("IDCateChild")+ "&idPr=" + Eval("IDCateParrent")  %>'
                                                ToolTip="Edit Child Page"><%#Eval("CateChildName")%></asp:HyperLink>
                                            <asp:HiddenField ID="hidIDChild" runat="server" />
                                            <asp:ImageButton ID="btnDel" runat="server" CommandArgument='<%#Eval("IDCateChild") %>'
                                                CommandName="DelParent" ImageUrl="~/Admin/img/delete.png" ToolTip="Delete This Page"
                                                OnClick="btnDel_Click" />
                                        </div>
                                    </li>
                                </ItemTemplate>
                            </asp:Repeater>
                        </ul>
                    </ItemTemplate>
                </asp:Repeater>
            </td>
            <td valign="top">
                <table>
                    <tr>
                        <td>
                            Menu Children Name :
                        </td>
                        <td>
                            <asp:TextBox ID="txtMenuChild" runat="server" Width="200px" Height="25px"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="*"
                                ControlToValidate="txtMenuChild" ValidationGroup="save"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <%-- <tr>
                        <td>
                            Menu Parrent Name :
                        </td>
                        <td>
                            <asp:ComboBox ID="cbMenuParrent" runat="server" AutoCompleteMode="Append" AutoPostBack="true">
                            </asp:ComboBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="*"
                                ControlToValidate="cbMenuParrent" ValidationGroup="save"></asp:RequiredFieldValidator>
                        </td>
                    </tr>--%>
                    <tr>
                        <td>
                        </td>
                        <td>
                            <asp:Button ID="btnSave" runat="server" Text="SAVE" ValidationGroup="save" Style="height: 26px"
                                OnClick="btnSave_Click" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</div>
